#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
char server[] = "192.168.1.101";
IPAddress ip(192, 168, 1, 100);
EthernetClient client;

void setup() {

	Serial.begin(9600);

	if (Ethernet.begin(mac) == 0) {
		Serial.println("Failed to configure Ethernet using DHCP");
		Ethernet.begin(mac, ip);
	}

}

void loop() {

	client.connect(server, 8080);

	client.println("GET /Telemetria/ws/teste HTTP/1.1");
	client.println("Host: 192.168.1.101:8080");
	client.println("Connection: keep-alive");
	client.println();

	while(client.available()) {
		char c = client.read();
		Serial.print(c);
	}

	delay(1000);

}
